package com.tinklabs.demo.adapter.multitype;

import android.support.annotation.NonNull;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import butterknife.BindView;
import me.drakeet.multitype.ItemViewBinder;

import com.tinklabs.demo.R;
import com.tinklabs.demo.adapter.viewholder.BaseViewHolder;
import com.tinklabs.demo.bean.CityGuideResult;

/**
 * Created by Jennifer on 2018/4/14.
 */

public class CityGuideSpecialViewBinder extends ItemViewBinder<CityGuideResult.Item, CityGuideSpecialViewBinder.CityGuideViewHolder> {

    @NonNull
    @Override
    protected CityGuideViewHolder onCreateViewHolder(@NonNull LayoutInflater inflater, @NonNull ViewGroup parent) {
        View view = inflater.inflate(R.layout.city_guide_special_item, parent, false);
        return new CityGuideViewHolder(view);
    }

    @Override
    protected void onBindViewHolder(@NonNull CityGuideViewHolder holder, @NonNull CityGuideResult.Item item) {
        holder.img.setImageResource(R.mipmap.picture2);
    }

    class CityGuideViewHolder extends BaseViewHolder {

        @BindView(R.id.city_guide_special_item_img)
        ImageView img;

        CityGuideViewHolder(View itemView) {
            super(itemView);
        }
    }
}
